package com.coderdream.chapter07.builder.a1;

public class TextBuilder implements Builder{
	
	private StringBuffer buffer = new StringBuffer();	

	/** 完成的文件
	 * 
	 */
	public Object getResult() {		
		buffer.append("===================================\n");// 花邊
		return buffer.toString();
	}

	public void makeItems(String[] items) {
		for (int i = 0; i < items.length; i++) {
			buffer.append("." + items[i] + "\n");
		}
		buffer.append("\n");
	}

	public void makeString(String str) {
		buffer.append('■' + str + "\n");
		
	}

	public void makeTitle(String title) {
		buffer.append("==================================\n");
		buffer.append("『" + title + "』\n");
		buffer.append("\n");
	}

}
